package com.infnoon.parking.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import lombok.Builder;
import lombok.Data;

/**
 * 
 * @TableName parkingbill
 */
@TableName(value ="parkingbill")
@Data
@Builder
public class Parkingbill implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer parkingRecordID;

    /**
     * 
     */
    private Date date;

    /**
     * 
     */
    private Float parkingFee;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Parkingbill other = (Parkingbill) that;
        return (this.getParkingRecordID() == null ? other.getParkingRecordID() == null : this.getParkingRecordID().equals(other.getParkingRecordID()))
            && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate()))
            && (this.getParkingFee() == null ? other.getParkingFee() == null : this.getParkingFee().equals(other.getParkingFee()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getParkingRecordID() == null) ? 0 : getParkingRecordID().hashCode());
        result = prime * result + ((getDate() == null) ? 0 : getDate().hashCode());
        result = prime * result + ((getParkingFee() == null) ? 0 : getParkingFee().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", parkingRecordID=").append(parkingRecordID);
        sb.append(", date=").append(date);
        sb.append(", parkingFee=").append(parkingFee);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}